import 'package:flutter_test/flutter_test.dart';
import 'package:hly/hly.dart';
import 'package:hly/hly_platform_interface.dart';
import 'package:hly/hly_method_channel.dart';
import 'package:plugin_platform_interface/plugin_platform_interface.dart';

class MockHlyPlatform
    with MockPlatformInterfaceMixin
    implements HlyPlatform {

  @override
  Future<String?> getPlatformVersion() => Future.value('42');
}

void main() {
  final HlyPlatform initialPlatform = HlyPlatform.instance;

  test('$MethodChannelHly is the default instance', () {
    expect(initialPlatform, isInstanceOf<MethodChannelHly>());
  });

  test('getPlatformVersion', () async {
    Hly hlyPlugin = Hly();
    MockHlyPlatform fakePlatform = MockHlyPlatform();
    HlyPlatform.instance = fakePlatform;

    expect(await hlyPlugin.getPlatformVersion(), '42');
  });
}
